All Packages Class Hierarchy This Package Previous Next Index
Class sun.server.util.BufferManager
java.lang.Object
|
+----sun.server.util.BufferManager
- public class BufferManager
- extends Object
Manages a set of buffers, currently 32k each.
Also provides an interface to thread-specific buffers, if available.
-
BufferManager()
-
-
alloc()
- Get a byte array
-
free(byte[])
- Return a byte array to the pool
-
getThreadSpecificBuffer(int)
- Get a thread-specific buffer if one is available.
BufferManager
public BufferManager()
alloc
public static synchronized byte[] alloc()
- Get a byte array
free
public static synchronized void free(byte buf[])
- Return a byte array to the pool
getThreadSpecificBuffer
public static byte[] getThreadSpecificBuffer(int size)
- Get a thread-specific buffer if one is available. If one is
not available, default to using new to create one. Any type of
thread may call this method.
- Parameters:
- size - - the minimum size of the buffer returned.
- Returns:
- - the buffer
All Packages Class Hierarchy This Package Previous Next Index